package com.hzx.ssm.util;

import com.google.code.kaptcha.Constants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestParam;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

import javax.servlet.http.HttpServletRequest;

public class CodeByJedisUtil {
    @Autowired
    private static JedisPool jedisPool;
    private static Jedis jedis;
    public static boolean chekVerifyCode( String user_id, String verifyCodeActual) {
        String verifyCodeExepected = RedisAPI.get(user_id);

        if(verifyCodeActual == null || !verifyCodeActual.equals(verifyCodeExepected)) {
            return false;
        }
        return true;
    }
}
